package ficus.car_demo;

import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.0.0-pre2)",
    comments = "Source: frameMeta.proto")
public class SenderGrpc {

  private SenderGrpc() {}

  public static final String SERVICE_NAME = "ficus.car_demo.Sender";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<FrameMeta.SendRequest,
      ficus.car_demo.FrameMeta.SendReply> METHOD_SEND_META =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "ficus.car_demo.Sender", "sendMeta"),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.SendRequest.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.SendReply.getDefaultInstance()));
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<ficus.car_demo.FrameMeta.SendMetaRequest,
      ficus.car_demo.FrameMeta.SendReply> METHOD_SEND_META_INFO =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "ficus.car_demo.Sender", "sendMetaInfo"),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.SendMetaRequest.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.SendReply.getDefaultInstance()));
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<ficus.car_demo.FrameMeta.GpsListRequest,
      ficus.car_demo.FrameMeta.SendReply> METHOD_SEND_GPS_REQUEST =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "ficus.car_demo.Sender", "sendGpsRequest"),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.GpsListRequest.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.SendReply.getDefaultInstance()));
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<ficus.car_demo.FrameMeta.GpsListRequest,
      ficus.car_demo.FrameMeta.SendReply> METHOD_SEND_GPS_REQUEST_RETRY =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "ficus.car_demo.Sender", "sendGpsRequestRetry"),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.GpsListRequest.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.SendReply.getDefaultInstance()));
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<ficus.car_demo.FrameMeta.CarRegisterRequest,
      ficus.car_demo.FrameMeta.CarRegisterReply> METHOD_REGISTER_CAR =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "ficus.car_demo.Sender", "registerCar"),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.CarRegisterRequest.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.CarRegisterReply.getDefaultInstance()));
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<ficus.car_demo.FrameMeta.CameraRegisterRequest,
      ficus.car_demo.FrameMeta.CameraRegisterReply> METHOD_REGISTER_CAMERA =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "ficus.car_demo.Sender", "registerCamera"),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.CameraRegisterRequest.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(ficus.car_demo.FrameMeta.CameraRegisterReply.getDefaultInstance()));

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static SenderStub newStub(io.grpc.Channel channel) {
    return new SenderStub(channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static SenderBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    return new SenderBlockingStub(channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
   */
  public static SenderFutureStub newFutureStub(
      io.grpc.Channel channel) {
    return new SenderFutureStub(channel);
  }

  /**
   */
  public static abstract class SenderImplBase implements io.grpc.BindableService {

    /**
     * <pre>
     * Sends a frame
     * </pre>
     */
    public void sendMeta(ficus.car_demo.FrameMeta.SendRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_META, responseObserver);
    }

    /**
     * <pre>
     * Sends a meta frame
     * </pre>
     */
    public void sendMetaInfo(ficus.car_demo.FrameMeta.SendMetaRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_META_INFO, responseObserver);
    }

    /**
     */
    public void sendGpsRequest(ficus.car_demo.FrameMeta.GpsListRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_GPS_REQUEST, responseObserver);
    }

    /**
     */
    public void sendGpsRequestRetry(ficus.car_demo.FrameMeta.GpsListRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_GPS_REQUEST_RETRY, responseObserver);
    }

    /**
     */
    public void registerCar(ficus.car_demo.FrameMeta.CarRegisterRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.CarRegisterReply> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_REGISTER_CAR, responseObserver);
    }

    /**
     */
    public void registerCamera(ficus.car_demo.FrameMeta.CameraRegisterRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.CameraRegisterReply> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_REGISTER_CAMERA, responseObserver);
    }

    @java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            METHOD_SEND_META,
            asyncUnaryCall(
              new MethodHandlers<
                ficus.car_demo.FrameMeta.SendRequest,
                ficus.car_demo.FrameMeta.SendReply>(
                  this, METHODID_SEND_META)))
          .addMethod(
            METHOD_SEND_META_INFO,
            asyncUnaryCall(
              new MethodHandlers<
                ficus.car_demo.FrameMeta.SendMetaRequest,
                ficus.car_demo.FrameMeta.SendReply>(
                  this, METHODID_SEND_META_INFO)))
          .addMethod(
            METHOD_SEND_GPS_REQUEST,
            asyncUnaryCall(
              new MethodHandlers<
                ficus.car_demo.FrameMeta.GpsListRequest,
                ficus.car_demo.FrameMeta.SendReply>(
                  this, METHODID_SEND_GPS_REQUEST)))
          .addMethod(
            METHOD_SEND_GPS_REQUEST_RETRY,
            asyncUnaryCall(
              new MethodHandlers<
                ficus.car_demo.FrameMeta.GpsListRequest,
                ficus.car_demo.FrameMeta.SendReply>(
                  this, METHODID_SEND_GPS_REQUEST_RETRY)))
          .addMethod(
            METHOD_REGISTER_CAR,
            asyncUnaryCall(
              new MethodHandlers<
                ficus.car_demo.FrameMeta.CarRegisterRequest,
                ficus.car_demo.FrameMeta.CarRegisterReply>(
                  this, METHODID_REGISTER_CAR)))
          .addMethod(
            METHOD_REGISTER_CAMERA,
            asyncUnaryCall(
              new MethodHandlers<
                ficus.car_demo.FrameMeta.CameraRegisterRequest,
                ficus.car_demo.FrameMeta.CameraRegisterReply>(
                  this, METHODID_REGISTER_CAMERA)))
          .build();
    }
  }

  /**
   */
  public static final class SenderStub extends io.grpc.stub.AbstractStub<SenderStub> {
    private SenderStub(io.grpc.Channel channel) {
      super(channel);
    }

    private SenderStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SenderStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new SenderStub(channel, callOptions);
    }

    /**
     * <pre>
     * Sends a frame
     * </pre>
     */
    public void sendMeta(ficus.car_demo.FrameMeta.SendRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_META, getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * Sends a meta frame
     * </pre>
     */
    public void sendMetaInfo(ficus.car_demo.FrameMeta.SendMetaRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_META_INFO, getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void sendGpsRequest(ficus.car_demo.FrameMeta.GpsListRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_GPS_REQUEST, getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void sendGpsRequestRetry(ficus.car_demo.FrameMeta.GpsListRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_GPS_REQUEST_RETRY, getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void registerCar(ficus.car_demo.FrameMeta.CarRegisterRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.CarRegisterReply> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_REGISTER_CAR, getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void registerCamera(ficus.car_demo.FrameMeta.CameraRegisterRequest request,
        io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.CameraRegisterReply> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_REGISTER_CAMERA, getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class SenderBlockingStub extends io.grpc.stub.AbstractStub<SenderBlockingStub> {
    private SenderBlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

    private SenderBlockingStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SenderBlockingStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new SenderBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     * Sends a frame
     * </pre>
     */
    public ficus.car_demo.FrameMeta.SendReply sendMeta(ficus.car_demo.FrameMeta.SendRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_META, getCallOptions(), request);
    }

    /**
     * <pre>
     * Sends a meta frame
     * </pre>
     */
    public ficus.car_demo.FrameMeta.SendReply sendMetaInfo(ficus.car_demo.FrameMeta.SendMetaRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_META_INFO, getCallOptions(), request);
    }

    /**
     */
    public ficus.car_demo.FrameMeta.SendReply sendGpsRequest(ficus.car_demo.FrameMeta.GpsListRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_GPS_REQUEST, getCallOptions(), request);
    }

    /**
     */
    public ficus.car_demo.FrameMeta.SendReply sendGpsRequestRetry(ficus.car_demo.FrameMeta.GpsListRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_GPS_REQUEST_RETRY, getCallOptions(), request);
    }

    /**
     */
    public ficus.car_demo.FrameMeta.CarRegisterReply registerCar(ficus.car_demo.FrameMeta.CarRegisterRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_REGISTER_CAR, getCallOptions(), request);
    }

    /**
     */
    public ficus.car_demo.FrameMeta.CameraRegisterReply registerCamera(ficus.car_demo.FrameMeta.CameraRegisterRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_REGISTER_CAMERA, getCallOptions(), request);
    }
  }

  /**
   */
  public static final class SenderFutureStub extends io.grpc.stub.AbstractStub<SenderFutureStub> {
    private SenderFutureStub(io.grpc.Channel channel) {
      super(channel);
    }

    private SenderFutureStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SenderFutureStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new SenderFutureStub(channel, callOptions);
    }

    /**
     * <pre>
     * Sends a frame
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<ficus.car_demo.FrameMeta.SendReply> sendMeta(
        ficus.car_demo.FrameMeta.SendRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_META, getCallOptions()), request);
    }

    /**
     * <pre>
     * Sends a meta frame
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<ficus.car_demo.FrameMeta.SendReply> sendMetaInfo(
        ficus.car_demo.FrameMeta.SendMetaRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_META_INFO, getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<ficus.car_demo.FrameMeta.SendReply> sendGpsRequest(
        ficus.car_demo.FrameMeta.GpsListRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_GPS_REQUEST, getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<ficus.car_demo.FrameMeta.SendReply> sendGpsRequestRetry(
        ficus.car_demo.FrameMeta.GpsListRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_GPS_REQUEST_RETRY, getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<ficus.car_demo.FrameMeta.CarRegisterReply> registerCar(
        ficus.car_demo.FrameMeta.CarRegisterRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_REGISTER_CAR, getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<ficus.car_demo.FrameMeta.CameraRegisterReply> registerCamera(
        ficus.car_demo.FrameMeta.CameraRegisterRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_REGISTER_CAMERA, getCallOptions()), request);
    }
  }

  private static final int METHODID_SEND_META = 0;
  private static final int METHODID_SEND_META_INFO = 1;
  private static final int METHODID_SEND_GPS_REQUEST = 2;
  private static final int METHODID_SEND_GPS_REQUEST_RETRY = 3;
  private static final int METHODID_REGISTER_CAR = 4;
  private static final int METHODID_REGISTER_CAMERA = 5;

  private static class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final SenderImplBase serviceImpl;
    private final int methodId;

    public MethodHandlers(SenderImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SEND_META:
          serviceImpl.sendMeta((ficus.car_demo.FrameMeta.SendRequest) request,
              (io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply>) responseObserver);
          break;
        case METHODID_SEND_META_INFO:
          serviceImpl.sendMetaInfo((ficus.car_demo.FrameMeta.SendMetaRequest) request,
              (io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply>) responseObserver);
          break;
        case METHODID_SEND_GPS_REQUEST:
          serviceImpl.sendGpsRequest((ficus.car_demo.FrameMeta.GpsListRequest) request,
              (io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply>) responseObserver);
          break;
        case METHODID_SEND_GPS_REQUEST_RETRY:
          serviceImpl.sendGpsRequestRetry((ficus.car_demo.FrameMeta.GpsListRequest) request,
              (io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.SendReply>) responseObserver);
          break;
        case METHODID_REGISTER_CAR:
          serviceImpl.registerCar((ficus.car_demo.FrameMeta.CarRegisterRequest) request,
              (io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.CarRegisterReply>) responseObserver);
          break;
        case METHODID_REGISTER_CAMERA:
          serviceImpl.registerCamera((ficus.car_demo.FrameMeta.CameraRegisterRequest) request,
              (io.grpc.stub.StreamObserver<ficus.car_demo.FrameMeta.CameraRegisterReply>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    return new io.grpc.ServiceDescriptor(SERVICE_NAME,
        METHOD_SEND_META,
        METHOD_SEND_META_INFO,
        METHOD_SEND_GPS_REQUEST,
        METHOD_SEND_GPS_REQUEST_RETRY,
        METHOD_REGISTER_CAR,
        METHOD_REGISTER_CAMERA);
  }

}
